class HowRelatedsController < ApplicationController
  def index
    @how_relateds = HowRelated.all
  end

  def show
    @how_related = HowRelated.find(params[:id])
  end

  def new
    @how_related = HowRelated.new
  end

  def create
    @how_related = HowRelated.new(params[:how_related])
    if @how_related.save
      redirect_to @how_related, :notice => "Successfully created how related."
    else
      render :action => 'new'
    end
  end

  def edit
    @how_related = HowRelated.find(params[:id])
  end

  def update
    @how_related = HowRelated.find(params[:id])
    if @how_related.update_attributes(params[:how_related])
      redirect_to @how_related, :notice  => "Successfully updated how related."
    else
      render :action => 'edit'
    end
  end

  def destroy
    @how_related = HowRelated.find(params[:id])
    @how_related.destroy
    redirect_to how_relateds_url, :notice => "Successfully destroyed how related."
  end
end
